nlp_architect.common.core_nlp_doc.CoreNLPDoc

class nlp_architect.common.core_nlp_doc.CoreNLPDoc[source]

Object for core-components (POS, Dependency Relations, etc).

Parameters:
  • self.doc_text (str) – the doc text
  • self.sentences (list(list(dict))) – list of sentences, each word in a sentence is represented in a dict, structured as follows: {‘start’: (int), ‘len’: (int), ‘pos’: (str), ‘ner’: (str), ‘lemma’: (str), ‘gov’: (int), ‘rel’: (str)}
__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__() Initialize self.
brat_doc() Return doc adapted to BRAT expected input
displacy_doc() Return doc adapted to displacyENT expected input
json() Return json representations of the object
pretty_json() Return pretty json representations of the object
brat_doc()[source]

Return doc adapted to BRAT expected input

displacy_doc()[source]

Return doc adapted to displacyENT expected input

json()[source]

Return json representations of the object

Returns:json representations of the object
Return type:json
pretty_json()[source]

Return pretty json representations of the object

Returns:pretty json representations of the object
Return type:json